package com.zyy.composite;

/**
 * @Description: 菜单组件 不管菜单还是菜单项，都应该继承该类  抽象类
 * @Author: zyy
 * @Date: 2023/07/31 22:20
 */
public abstract class MenuComponent {
    protected String name;
    protected int level;


    public String getName() {
        return name;
    }

    public void add(MenuComponent menuComponent) {
        throw new UnsupportedOperationException();
    }


    public void remove(MenuComponent menuComponent) {
        throw new UnsupportedOperationException();
    }


    public MenuComponent getChild(int i) {
        throw new UnsupportedOperationException();
    }


    public void print() {
        throw new UnsupportedOperationException();
    }

}
